Optimal. Leaf size=51 \[ -\frac {c^2}{a x}-\frac {c (b c-2 a d) \log (x)}{a^2}+\frac {(b c-a d)^2 \log (a+b x)}{a^2 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {90}
\begin {gather*} -\frac {c \log (x) (b c-2 a d)}{a^2}+\frac {(b c-a d)^2 \log (a+b x)}{a^2 b}-\frac {c^2}{a x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 90
Rubi steps
\begin {align*} \int \frac {(c+d x)^2}{x^2 (a+b x)} \, dx &=\int \left (\frac {c^2}{a x^2}+\frac {c (-b c+2 a d)}{a^2 x}+\frac {(-b c+a d)^2}{a^2 (a+b x)}\right ) \, dx\\ &=-\frac {c^2}{a x}-\frac {c (b c-2 a d) \log (x)}{a^2}+\frac {(b c-a d)^2 \log (a+b x)}{a^2 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 51, normalized size = 1.00 \begin {gather*} \frac {-a b c^2+b c (-b c+2 a d) x \log (x)+(b c-a d)^2 x \log (a+b x)}{a^2 b x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 63, normalized size = 1.24
method | result | size |
default | \(\frac {\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \ln \left (b x +a \right )}{a^{2} b}-\frac {c^{2}}{a x}+\frac {c \left (2 a d -b c \right ) \ln \left (x \right )}{a^{2}}\) | \(63\) |
norman | \(\frac {\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \ln \left (b x +a \right )}{a^{2} b}-\frac {c^{2}}{a x}+\frac {c \left (2 a d -b c \right ) \ln \left (x \right )}{a^{2}}\) | \(63\) |
risch | \(-\frac {c^{2}}{a x}+\frac {2 c \ln \left (x \right ) d}{a}-\frac {c^{2} \ln \left (x \right ) b}{a^{2}}+\frac {\ln \left (-b x -a \right ) d^{2}}{b}-\frac {2 \ln \left (-b x -a \right ) c d}{a}+\frac {b \ln \left (-b x -a \right ) c^{2}}{a^{2}}\) | \(82\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.39, size = 64, normalized size = 1.25 \begin {gather*} -\frac {c^{2}}{a x} - \frac {{\left (b c^{2} - 2 \, a c d\right )} \log \left (x\right )}{a^{2}} + \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (b x + a\right )}{a^{2} b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.10, size = 66, normalized size = 1.29 \begin {gather*} -\frac {a b c^{2} - {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} x \log \left (b x + a\right ) + {\left (b^{2} c^{2} - 2 \, a b c d\right )} x \log \left (x\right )}{a^{2} b x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 141 vs.
\(2 (42) = 84\).
time = 0.42, size = 141, normalized size = 2.76 \begin {gather*} - \frac {c^{2}}{a x} + \frac {c \left (2 a d - b c\right ) \log {\left (x + \frac {- 2 a^{2} c d + a b c^{2} + a c \left (2 a d - b c\right )}{a^{2} d^{2} - 4 a b c d + 2 b^{2} c^{2}} \right )}}{a^{2}} + \frac {\left (a d - b c\right )^{2} \log {\left (x + \frac {- 2 a^{2} c d + a b c^{2} + \frac {a \left (a d - b c\right )^{2}}{b}}{a^{2} d^{2} - 4 a b c d + 2 b^{2} c^{2}} \right )}}{a^{2} b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.07, size = 66, normalized size = 1.29 \begin {gather*} -\frac {c^{2}}{a x} - \frac {{\left (b c^{2} - 2 \, a c d\right )} \log \left ({\left | x \right |}\right )}{a^{2}} + \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left ({\left | b x + a \right |}\right )}{a^{2} b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.41, size = 58, normalized size = 1.14 \begin {gather*} \ln \left (a+b\,x\right )\,\left (\frac {d^2}{b}+\frac {b\,c^2}{a^2}-\frac {2\,c\,d}{a}\right )-\frac {c^2}{a\,x}+\frac {c\,\ln \left (x\right )\,\left (2\,a\,d-b\,c\right )}{a^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________